<?php
/*------------------------------------------------------------------------
# com_vportfolio - Vportfolio component
# ------------------------------------------------------------------------
# author    Vsmart Extensions
# copyright Copyright (C) 2010 www.vsmart-extensions.com. All Rights Reserved.
# @license - http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
# Websites: http://www.vsmart-extensions.com
# Technical Support:  Forum - http://www.vsmart-extensions.com
-------------------------------------------------------------------------*/
// no direct access
defined( '_JEXEC' ) or die( 'Restricted access' );

// specific controller?
$controller = JRequest::getCmd('controller','vportfolio');

require_once (JPATH_COMPONENT.DS.'controllers'.DS.$controller.'.php');
require_once( JPATH_COMPONENT.DS.'models'.DS.'vportfolio.php' );
require_once( JPATH_COMPONENT.DS.'models'.DS.'config.php' );
require_once( JPATH_COMPONENT.DS.'models'.DS.'category.php' );
require_once( JPATH_COMPONENT.DS.'views'.DS.$controller.DS.'view.php' );

require_once( JPATH_COMPONENT.DS.'admin.vst_functions.php' );


 

// Create the controller
switch($controller){
	case 'config':
		$classname  = 'vportfolioConfigController';
		break;
	case 'category':
		$classname  = 'vportfolioCategoryController';
		break;
	case 'vportfolio':
	default:
		$classname  = 'vportfolioController';
		break;
}



//exit;
$controller = new $classname( array('default_task' => 'display') );

// Perform the Request task
$controller->execute( JRequest::getVar('task' ));

// Redirect if set by the controller
$controller->redirect();

 
?>
